(function() {
        "use strict";
        function e(e) {
            return e = String(e),
            e.charAt(0).toUpperCase() + e.slice(1)
        }
        function t(e, t, o) {
            var i = {
                "10.0": "10",
                6.4: "10 Technical Preview",
                6.3: "8.1",
                6.2: "8",
                6.1: "7 / Server 2008 R2",
                "6.0": "Vista / Server 2008",
                5.2: "XP 64-bit / Server 2003",
                5.1: "XP",
                5.01: "2000 SP1",
                "5.0": "2000",
                "4.0": "NT",
                "4.90": "ME"
            };
            return t && o && /^Win/i.test(e) && !/^Windows Phone /i.test(e) && (i = i[/[\d.]+$/.exec(e)]) && (e = "Windows " + i),
                e = String(e),
            t && o && (e = e.replace(RegExp(t, "i"), o)),
                e = n(e.replace(/ ce$/i, " CE").replace(/\bhpw/i, "web").replace(/\bMacintosh\b/, "Mac OS").replace(/_PowerPC\b/i, " OS").replace(/\b(OS X) [^ \d]+/i, "$1").replace(/\bMac (OS X)\b/, "$1").replace(/\/(\d)/, " $1").replace(/_/g, ".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, "").replace(/\bx86\.64\b/gi, "x86_64").replace(/\b(Windows Phone) OS\b/, "$1").replace(/\b(Chrome OS \w+) [\d.]+\b/, "$1").split(" on ")[0])
        }
        function o(e, t) {
            var o = -1
                , n = e ? e.length : 0;
            if ("number" == typeof n && n > -1 && n <= v)
                for (; ++o < n; )
                    t(e[o], o, e);
            else
                i(e, t)
        }
        function n(t) {
            return t = c(t),
                /^(?:webOS|i(?:OS|P))/.test(t) ? t : e(t)
        }
        function i(e, t) {
            for (var o in e)
                w.call(e, o) && t(e[o], o, e)
        }
        function a(t) {
            return null == t ? e(t) : M.call(t).slice(8, -1)
        }
        function r(e, t) {
            var o = null != e ? typeof e[t] : "number";
            return !(/^(?:boolean|number|string|undefined)$/.test(o) || "object" == o && !e[t])
        }
        function s(e) {
            return String(e).replace(/([ -])(?!$)/g, "$1?")
        }
        function l(e, t) {
            var n = null;
            return o(e, function(o, i) {
                n = t(n, o, i, e)
            }),
                n
        }
        function c(e) {
            return String(e).replace(/^ +| +$/g, "")
        }
        function p(e) {
            function o(t) {
                return l(t, function(t, o) {
                    return t || RegExp("\\b" + (o.pattern || s(o)) + "\\b", "i").exec(e) && (o.label || o)
                })
            }
            function u(t) {
                return l(t, function(t, o, n) {
                    return t || (o[H] || o[/^[a-z]+(?: +[a-z]+\b)*/i.exec(H)] || RegExp("\\b" + s(n) + "(?:\\b|\\w*\\d)", "i").exec(e)) && n
                })
            }
            function b(t) {
                return l(t, function(t, o) {
                    return t || RegExp("\\b" + (o.pattern || s(o)) + "\\b", "i").exec(e) && (o.label || o)
                })
            }
            function d(o) {
                return l(o, function(o, n) {
                    var i = n.pattern || s(n);
                    return !o && (o = RegExp("\\b" + i + "(?:/[\\d.]+|[ \\w.]*)", "i").exec(e)) && (o = t(o, i, n.label || n)),
                        o
                })
            }
            function f(t) {
                return l(t, function(t, o) {
                    var i = o.pattern || s(o);
                    return !t && (t = RegExp("\\b" + i + " *\\d+[.\\w_]*", "i").exec(e) || RegExp("\\b" + i + "(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)", "i").exec(e)) && ((t = String(o.label && !RegExp(i, "i").test(o.label) ? o.label : t).split("/"))[1] && !/[\d.]+/.test(t[0]) && (t[0] += " " + t[1]),
                        o = o.label || o,
                        t = n(t[0].replace(RegExp(i, "i"), o).replace(RegExp("; *(?:" + o + "[_-])?", "i"), " ").replace(RegExp("(" + o + ")[-_.]?(\\w)", "i"), "$1 $2"))),
                        t
                })
            }
            function S(t) {
                return l(t, function(t, o) {
                    return t || (RegExp(o + "(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)", "i").exec(e) || 0)[1] || null
                })
            }
            function g() {
                return this.description || ""
            }
            var x = m
                , v = e && "object" == typeof e && "String" != a(e);
            v && (x = e,
                e = null);
            var y = x.navigator || {}
                , w = y.userAgent || "";
            e || (e = w);
            var P, k, C = v || O == h, E = v ? !!y.likeChrome : /\bChrome\b/.test(e) && !/internal|\n/i.test(M.toString()), T = "Object", B = v ? T : "ScriptBridgingProxyObject", W = v ? T : "Environment", R = v && x.java ? "JavaPackage" : a(x.java), A = v ? T : "RuntimeObject", F = /\bJava/.test(R) && x.java, $ = F && a(x.environment) == W, G = F ? "a" : "α", _ = F ? "b" : "β", N = x.document || {}, j = x.operamini || x.opera, D = I.test(D = v && j ? j["[[Class]]"] : a(j)) ? D : j = null, X = e, K = [], q = null, U = e == w, V = U && j && "function" == typeof j.version && j.version(), z = o([{
                label: "EdgeHTML",
                pattern: "Edge"
            }, "Trident", {
                label: "WebKit",
                pattern: "AppleWebKit"
            }, "iCab", "Presto", "NetFront", "Tasman", "KHTML", "Gecko"]), L = b(["Adobe AIR", "Arora", "Avant Browser", "Breach", "Camino", "Epiphany", "Fennec", "Flock", "Galeon", "GreenBrowser", "iCab", "Iceweasel", "K-Meleon", "Konqueror", "Lunascape", "Maxthon", {
                label: "Microsoft Edge",
                pattern: "Edge"
            }, "Midori", "Nook Browser", "PaleMoon", "PhantomJS", "Raven", "Rekonq", "RockMelt", "SeaMonkey", {
                label: "Silk",
                pattern: "(?:Cloud9|Silk-Accelerated)"
            }, "Sleipnir", "SlimBrowser", {
                label: "SRWare Iron",
                pattern: "Iron"
            }, "Sunrise", "Swiftfox", "WebPositive", "Opera Mini", {
                label: "Opera Mini",
                pattern: "OPiOS"
            }, "Opera", {
                label: "Opera",
                pattern: "OPR"
            }, "Chrome", {
                label: "Chrome Mobile",
                pattern: "(?:CriOS|CrMo)"
            }, {
                label: "Firefox",
                pattern: "(?:Firefox|Minefield)"
            }, {
                label: "Firefox Mobile",
                pattern: "FxiOS"
            }, {
                label: "IE",
                pattern: "IEMobile"
            }, {
                label: "IE",
                pattern: "MSIE"
            }, "Safari"]), H = f([{
                label: "BlackBerry",
                pattern: "BB10"
            }, "BlackBerry", {
                label: "Galaxy S",
                pattern: "GT-I9000"
            }, {
                label: "Galaxy S2",
                pattern: "GT-I9100"
            }, {
                label: "Galaxy S3",
                pattern: "GT-I9300"
            }, {
                label: "Galaxy S4",
                pattern: "GT-I9500"
            }, "Google TV", "Lumia", "iPad", "iPod", "iPhone", "Kindle", {
                label: "Kindle Fire",
                pattern: "(?:Cloud9|Silk-Accelerated)"
            }, "Nexus", "Nook", "PlayBook", "PlayStation 3", "PlayStation 4", "PlayStation Vita", "TouchPad", "Transformer", {
                label: "Wii U",
                pattern: "WiiU"
            }, "Wii", "Xbox One", {
                label: "Xbox 360",
                pattern: "Xbox"
            }, "Xoom"]), J = u({
                Apple: {
                    iPad: 1,
                    iPhone: 1,
                    iPod: 1
                },
                Amazon: {
                    Kindle: 1,
                    "Kindle Fire": 1
                },
                Asus: {
                    Transformer: 1
                },
                "Barnes & Noble": {
                    Nook: 1
                },
                BlackBerry: {
                    PlayBook: 1
                },
                Google: {
                    "Google TV": 1,
                    Nexus: 1
                },
                HP: {
                    TouchPad: 1
                },
                HTC: {},
                LG: {},
                Microsoft: {
                    Xbox: 1,
                    "Xbox One": 1
                },
                Motorola: {
                    Xoom: 1
                },
                Nintendo: {
                    "Wii U": 1,
                    Wii: 1
                },
                Nokia: {
                    Lumia: 1
                },
                Samsung: {
                    "Galaxy S": 1,
                    "Galaxy S2": 1,
                    "Galaxy S3": 1,
                    "Galaxy S4": 1
                },
                Sony: {
                    "PlayStation 4": 1,
                    "PlayStation 3": 1,
                    "PlayStation Vita": 1
                }
            }), Z = d(["Windows Phone ", "Android", "CentOS", {
                label: "Chrome OS",
                pattern: "CrOS"
            }, "Debian", "Fedora", "FreeBSD", "Gentoo", "Haiku", "Kubuntu", "Linux Mint", "OpenBSD", "Red Hat", "SuSE", "Ubuntu", "Xubuntu", "Cygwin", "Symbian OS", "hpwOS", "webOS ", "webOS", "Tablet OS", "Linux", "Mac OS X", "Macintosh", "Mac", "Windows 98;", "Windows "]);
            if (z && (z = [z]),
            J && !H && (H = f([J])),
            (P = /\bGoogle TV\b/.exec(H)) && (H = P[0]),
            /\bSimulator\b/i.test(e) && (H = (H ? H + " " : "") + "Simulator"),
            "Opera Mini" == L && /\bOPiOS\b/.test(e) && K.push("running in Turbo/Uncompressed mode"),
                /^iP/.test(H) ? (L || (L = "Safari"),
                    Z = "iOS" + ((P = / OS ([\d_]+)/i.exec(e)) ? " " + P[1].replace(/_/g, ".") : "")) : "Konqueror" != L || /buntu/i.test(Z) ? J && "Google" != J && (/Chrome/.test(L) && !/\bMobile Safari\b/i.test(e) || /\bVita\b/.test(H)) ? (L = "Android Browser",
                    Z = /\bAndroid\b/.test(Z) ? Z : "Android") : "Silk" == L ? (/\bMobi/i.test(e) || (Z = "Android",
                    K.unshift("desktop mode")),
                /Accelerated *= *true/i.test(e) && K.unshift("accelerated")) : "PaleMoon" == L && (P = /\bFirefox\/([\d.]+)\b/.exec(e)) ? K.push("identifying as Firefox " + P[1]) : "Firefox" == L && (P = /\b(Mobile|Tablet|TV)\b/i.exec(e)) ? (Z || (Z = "Firefox OS"),
                H || (H = P[1])) : L && !(P = !/\bMinefield\b/i.test(e) && /\b(?:Firefox|Safari)\b/.exec(L)) || (L && !H && /[\/,]|^[^(]+?\)/.test(e.slice(e.indexOf(P + "/") + 8)) && (L = null),
                (P = H || J || Z) && (H || J || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Z)) && (L = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Z) ? Z : P) + " Browser")) : Z = "Kubuntu",
            V || (V = S(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|Silk(?!/[\\d.]+$))", "Version", s(L), "(?:Firefox|Minefield|NetFront)"])),
            (P = "iCab" == z && parseFloat(V) > 3 && "WebKit" || /\bOpera\b/.test(L) && (/\bOPR\b/.test(e) ? "Blink" : "Presto") || /\b(?:Midori|Nook|Safari)\b/i.test(e) && !/^(?:Trident|EdgeHTML)$/.test(z) && "WebKit" || !z && /\bMSIE\b/i.test(e) && ("Mac OS" == Z ? "Tasman" : "Trident") || "WebKit" == z && /\bPlayStation\b(?! Vita\b)/i.test(L) && "NetFront") && (z = [P]),
                "IE" == L && (P = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(e) || 0)[1]) ? (L += " Mobile",
                    Z = "Windows Phone " + (/\+$/.test(P) ? P : P + ".x"),
                    K.unshift("desktop mode")) : /\bWPDesktop\b/i.test(e) ? (L = "IE Mobile",
                    Z = "Windows Phone 8.x",
                    K.unshift("desktop mode"),
                V || (V = (/\brv:([\d.]+)/.exec(e) || 0)[1])) : "IE" != L && "Trident" == z && (P = /\brv:([\d.]+)/.exec(e)) && (L && K.push("identifying as " + L + (V ? " " + V : "")),
                    L = "IE",
                    V = P[1]),
                U) {
                if (r(x, "global"))
                    if (F && (P = F.lang.System,
                        X = P.getProperty("os.arch"),
                        Z = Z || P.getProperty("os.name") + " " + P.getProperty("os.version")),
                    C && r(x, "system") && (P = [x.system])[0]) {
                        Z || (Z = P[0].os || null);
                        try {
                            P[1] = x.require("ringo/engine").version,
                                V = P[1].join("."),
                                L = "RingoJS"
                        } catch (e) {
                            P[0].global.system == x.system && (L = "Narwhal")
                        }
                    } else
                        "object" == typeof x.process && (P = x.process) ? (L = "Node.js",
                            X = P.arch,
                            Z = P.platform,
                            V = /[\d.]+/.exec(P.version)[0]) : $ && (L = "Rhino");
                else
                    a(P = x.runtime) == B ? (L = "Adobe AIR",
                        Z = P.flash.system.Capabilities.os) : a(P = x.phantom) == A ? (L = "PhantomJS",
                        V = (P = P.version || null) && P.major + "." + P.minor + "." + P.patch) : "number" == typeof N.documentMode && (P = /\bTrident\/(\d+)/i.exec(e)) && (V = [V, N.documentMode],
                    (P = +P[1] + 4) != V[1] && (K.push("IE " + V[1] + " mode"),
                    z && (z[1] = ""),
                        V[1] = P),
                        V = "IE" == L ? String(V[1].toFixed(1)) : V[0]);
                Z = Z && n(Z)
            }
            V && (P = /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(V) || /(?:alpha|beta)(?: ?\d)?/i.exec(e + ";" + (U && y.appMinorVersion)) || /\bMinefield\b/i.test(e) && "a") && (q = /b/i.test(P) ? "beta" : "alpha",
                V = V.replace(RegExp(P + "\\+?$"), "") + ("beta" == q ? _ : G) + (/\d+\+?/.exec(P) || "")),
                "Fennec" == L || "Firefox" == L && /\b(?:Android|Firefox OS)\b/.test(Z) ? L = "Firefox Mobile" : "Maxthon" == L && V ? V = V.replace(/\.[\d.]+/, ".x") : /\bXbox\b/i.test(H) ? (Z = null,
                "Xbox 360" == H && /\bIEMobile\b/.test(e) && K.unshift("mobile mode")) : !/^(?:Chrome|IE|Opera)$/.test(L) && (!L || H || /Browser|Mobi/.test(L)) || "Windows CE" != Z && !/Mobi/i.test(e) ? "IE" == L && U && null === x.external ? K.unshift("platform preview") : (/\bBlackBerry\b/.test(H) || /\bBB10\b/.test(e)) && (P = (RegExp(H.replace(/ +/g, " *") + "/([.\\d]+)", "i").exec(e) || 0)[1] || V) ? (P = [P, /BB10/.test(e)],
                    Z = (P[1] ? (H = null,
                        J = "BlackBerry") : "Device Software") + " " + P[0],
                    V = null) : this != i && "Wii" != H && (U && j || /Opera/.test(L) && /\b(?:MSIE|Firefox)\b/i.test(e) || "Firefox" == L && /\bOS X (?:\d+\.){2,}/.test(Z) || "IE" == L && (Z && !/^Win/.test(Z) && V > 5.5 || /\bWindows XP\b/.test(Z) && V > 8 || 8 == V && !/\bTrident\b/.test(e))) && !I.test(P = p.call(i, e.replace(I, "") + ";")) && P.name && (P = "ing as " + P.name + ((P = P.version) ? " " + P : ""),
                    I.test(L) ? (/\bIE\b/.test(P) && "Mac OS" == Z && (Z = null),
                        P = "identify" + P) : (P = "mask" + P,
                        L = D ? n(D.replace(/([a-z])([A-Z])/g, "$1 $2")) : "Opera",
                    /\bIE\b/.test(P) && (Z = null),
                    U || (V = null)),
                    z = ["Presto"],
                    K.push(P)) : L += " Mobile",
            (P = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(e) || 0)[1]) && (P = [parseFloat(P.replace(/\.(\d)$/, ".0$1")), P],
                "Safari" == L && "+" == P[1].slice(-1) ? (L = "WebKit Nightly",
                    q = "alpha",
                    V = P[1].slice(0, -1)) : V != P[1] && V != (P[2] = (/\bSafari\/([\d.]+\+?)/i.exec(e) || 0)[1]) || (V = null),
                P[1] = (/\bChrome\/([\d.]+)/i.exec(e) || 0)[1],
            537.36 == P[0] && 537.36 == P[2] && parseFloat(P[1]) >= 28 && "WebKit" == z && (z = ["Blink"]),
                U && (E || P[1]) ? (z && (z[1] = "like Chrome"),
                    P = P[1] || (P = P[0],
                        P < 530 ? 1 : P < 532 ? 2 : P < 532.05 ? 3 : P < 533 ? 4 : P < 534.03 ? 5 : P < 534.07 ? 6 : P < 534.1 ? 7 : P < 534.13 ? 8 : P < 534.16 ? 9 : P < 534.24 ? 10 : P < 534.3 ? 11 : P < 535.01 ? 12 : P < 535.02 ? "13+" : P < 535.07 ? 15 : P < 535.11 ? 16 : P < 535.19 ? 17 : P < 536.05 ? 18 : P < 536.1 ? 19 : P < 537.01 ? 20 : P < 537.11 ? "21+" : P < 537.13 ? 23 : P < 537.18 ? 24 : P < 537.24 ? 25 : P < 537.36 ? 26 : "Blink" != z ? "27" : "28")) : (z && (z[1] = "like Safari"),
                    P = P[0],
                    P = P < 400 ? 1 : P < 500 ? 2 : P < 526 ? 3 : P < 533 ? 4 : P < 534 ? "4+" : P < 535 ? 5 : P < 537 ? 6 : P < 538 ? 7 : P < 601 ? 8 : "8"),
            z && (z[1] += " " + (P += "number" == typeof P ? ".x" : /[.+]/.test(P) ? "" : "+")),
            "Safari" == L && (!V || parseInt(V) > 45) && (V = P)),
                "Opera" == L && (P = /\bzbov|zvav$/.exec(Z)) ? (L += " ",
                    K.unshift("desktop mode"),
                    "zvav" == P ? (L += "Mini",
                        V = null) : L += "Mobile",
                    Z = Z.replace(RegExp(" *" + P + "$"), "")) : "Safari" == L && /\bChrome\b/.exec(z && z[1]) && (K.unshift("desktop mode"),
                    L = "Chrome Mobile",
                    V = null,
                    /\bOS X\b/.test(Z) ? (J = "Apple",
                        Z = "iOS 4.3+") : Z = null),
            V && 0 == V.indexOf(P = /[\d.]+$/.exec(Z)) && e.indexOf("/" + P + "-") > -1 && (Z = c(Z.replace(P, ""))),
            z && !/\b(?:Avant|Nook)\b/.test(L) && (/Browser|Lunascape|Maxthon/.test(L) || "Safari" != L && /^iOS/.test(Z) && /\bSafari\b/.test(z[1]) || /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Sleipnir|Web)/.test(L) && z[1]) && (P = z[z.length - 1]) && K.push(P),
            K.length && (K = ["(" + K.join("; ") + ")"]),
            J && H && H.indexOf(J) < 0 && K.push("on " + J),
            H && K.push((/^on /.test(K[K.length - 1]) ? "" : "on ") + H),
            Z && (P = / ([\d.+]+)$/.exec(Z) || (k = /^[a-z]+ ([\d.+]+) \//i.exec(Z)),
                Z = {
                    architecture: 32,
                    family: P && !k ? Z.replace(P[0], "") : Z,
                    version: P ? P[1] : null,
                    toString: function() {
                        var e = this.version;
                        return this.family + (e && !k ? " " + e : "") + (64 == this.architecture ? " 64-bit" : "")
                    }
                }),
            (P = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(X)) && !/\bi686\b/i.test(X) && (Z && (Z.architecture = 64,
                Z.family = Z.family.replace(RegExp(" *" + P), "")),
            L && (/\bWOW64\b/i.test(e) || U && /\w(?:86|32)$/.test(y.cpuClass || y.platform) && !/\bWin64; x64\b/i.test(e)) && K.unshift("32-bit")),
            e || (e = null);
            var Q = {};
            return Q.description = e,
                Q.layout = z && z[0],
                Q.manufacturer = J,
                Q.name = L,
                Q.prerelease = q,
                Q.product = H,
                Q.ua = e,
                Q.version = L && V,
                Q.os = Z || {
                    architecture: null,
                    family: null,
                    version: null,
                    toString: function() {
                        return "null"
                    }
                },
                Q.parse = p,
                Q.toString = g,
            Q.version && K.unshift(V),
            Q.name && K.unshift(L),
            Z && L && (Z != String(Z).split(" ")[0] || Z != L.split(" ")[0] && !H) && K.push(H ? "(" + Z + ")" : "on " + Z),
            K.length && (Q.description = K.join(" ")),
                Q
        }
        function u(e) {
            for (var t = document.cookie, o = t.split("; "), n = 0; n < o.length; n++) {
                var i = o[n].split("=");
                if (i[0] == e)
                    return i[1]
            }
            return null
        }
        var b = "function"
            , d = "object"
            , f = {};
        f[b] = !0,
            f[d] = !0;
        var m = f[typeof window] && window || this
            , h = m
            , S = f[typeof exports] && exports
            , g = f[typeof module] && module && !module.nodeType && module
            , x = S && g && "object" == typeof global && global;
        !x || x.global !== x && x.window !== x && x.self !== x || (m = x);
        var v = Math.pow(2, 53) - 1
            , I = /\bOpera/
            , O = this
            , y = Object.prototype
            , w = y.hasOwnProperty
            , M = y.toString;
        m.ubaPlatform = p();
        var P = {};
        m.uba = P;
        for (var k = window, C = document, E = 0; E < 10 && (k && k.parent && k.parent.document); E++)
            k = k.parent,
                C = k.document;
        P.page = {
            title: C.title,
            prevUrl: C.referrer,
            currentUrl: location.href
        };
        var T = {};
        m.ubaPlatform && (T = m.ubaPlatform),
            P.platform = {
                browserName: T.name,
                browserVersion: T.version,
                osInfo: T.os ? T.os.toString() : "",
                platformDescription: T.description
            },
        "object" == typeof qimo_config && (P.account = qimo_config.account,
            P.accessId = qimo_config.accessId,
            P.ubaOnOff = qimo_config.ubaOnOff,
            P.sessionInvitation = qimo_config.sessionInvitation,
            P.uvpvSwitch = qimo_config.uvpvSwitch);
        var B = "qimo_seosource_" + P.accessId
            , W = "qimo_seokeywords_" + P.accessId;
        u(B) && (P.platform.seosource = decodeURIComponent(u(B))),
        u(B) && (P.platform.seokeywords = decodeURIComponent(u(W)))
    }
).call(this),
    function() {
        function e(e, o) {
            var n = t(e, o);
            n.uvpvSwitch = o.uvpvSwitch,
                a(c + "?action=" + e.path + "&data=" + encodeURIComponent(JSON.stringify(n)))
        }
        function t(e, t) {
            var o, n = i("openChat" + t.accessId), a = !1;
            switch (n && "true" == n && (a = !0),
                e.name) {
                case "load":
                    o = {
                        pageId: t.pageId,
                        userId: t.userId,
                        sessionId: t.sessionId,
                        account: t.account,
                        accessId: t.accessId,
                        platform: t.platform,
                        page: t.page,
                        type: "load",
                        isOpenChat: a,
                        rootDomain: t.rootDomain
                    };
                    break;
                case "unload":
                    var r = (new Date).getTime()
                        , s = r - p;
                    t.page.stayTime = s,
                        o = {
                            pageId: t.pageId,
                            userId: t.userId,
                            sessionId: t.sessionId,
                            account: t.account,
                            platform: t.platform,
                            page: t.page,
                            type: "unload",
                            isOpenChat: a
                        };
                    break;
                case "openChat":
                    o = {
                        pageId: t.pageId,
                        userId: t.userId,
                        sessionId: t.sessionId,
                        account: t.account,
                        platform: t.platform,
                        page: t.page,
                        type: "openChat",
                        isOpenChat: a
                    };
                    break;
                default:
                    o = {}
            }
            return o
        }
        function o(e, t, o, n) {
            var i = 864e5;
            o && (i *= o);
            var a = new Date;
            a.setTime(a.getTime() + i);
            var r = "; expires=" + a.toGMTString();
            o || (r = "");
            var s = "";
            if (n || (n = b.rootDomain),
            n && void 0 != n && (s = "; domain=" + n),
            "string" == typeof e)
                document.cookie = e + "=" + encodeURIComponent(t) + r + s + "; path=/";
            else
                for (var l in e)
                    document.cookie = l + "=" + encodeURIComponent(e[l]) + r + s + "; path=/"
        }
        function n() {
            o("openChat" + b.accessId, "true", null, b.rootDomain)
        }
        function i(e) {
            for (var t = document.cookie, o = t.split("; "), n = 0; n < o.length; n++) {
                var i = o[n].split("=");
                if (i[0] == e)
                    return i[1]
            }
            return null
        }
        function a(e) {
            var t = document.createElement("script");
            t.type = "text/javascript",
                t.src = e + "&callback=ubaGetCallback",
                document.body.appendChild(t)
        }
        function r() {
            if (d)
                return d;
            var e, t, o = location.host.split(":").shift().split("."), n = o.length;
            if (1 == n)
                return d = "";
            for (e = "TMP" + +new Date; n-- > 2 && (t = o.slice(1).join("."),
                document.cookie = e + "=" + e + "; domain=" + t,
                e = i(e),
                document.cookie = e + "=1; expires=Thu, 01 Jan 1970 00:00:00 GMT; domain=" + t,
                e); )
                o.shift();
            return d = o.join(".")
        }
        function s() {
            try {
                var e = {
                    ubaSessionId: b.sessionId,
                    ubaUserId: b.userId,
                    ubaPageId: b.pageId,
                    account: b.account,
                    platformDescription: b.platform.platformDescription,
                    browserName: b.platform.browserName,
                    osInfo: b.platform.osInfo
                }
                    , t = document.getElementById("qimo_chatpup");
                t && t.getElementsByTagName("iframe")[0].contentWindow.postMessage("ubaInfo_" + JSON.stringify(e), "*")
            } catch (e) {}
            m < 20 && setTimeout(function() {
                m < 10 && s()
            }, 500),
                m++
        }
        var l = this
            , c = "//ykf-uba.7moor.com/service"
            , p = (new Date).getTime()
            , u = {
            load: {
                name: "load",
                path: "page.load"
            },
            unload: {
                name: "unload",
                path: "page.unload"
            },
            openChat: {
                name: "openChat",
                path: "cc.openChat"
            }
        }
            , b = l.uba
            , d = "";
        b.rootDomain = r();
        var f = "bad_id" + b.accessId;
        b.userId = i(f);
        var f = "nice_id" + b.accessId;
        b.sessionId = i(f);
        var m = 0;
        l.moorOpenChat = function() {
            n(b.accessId)
        }
            ,
            window.onbeforeunload = function() {
                "true" !== b.ubaOnOff && "1" !== b.sessionInvitation && "true" !== b.uvpvSwitch || e(u.unload, b)
            }
            ,
            l.ubaGetIPCallback = function(e) {
                window.ubaip = e.ip,
                    b.platform.ip = e.ip
            }
            ,
            l.ubaGetCallback = function(e) {
                e.pageId && (b.pageId = e.pageId,
                    b.page.id = e.pageId),
                e.userId && (b.userId = e.userId,
                    o("bad_id" + b.accessId, e.userId, 1e5, b.rootDomain)),
                e.sessionId && (b.sessionId = e.sessionId,
                    o("nice_id" + b.accessId, e.sessionId, null, b.rootDomain)),
                    s()
            }
            ,
            "true" === b.ubaOnOff || "1" === b.sessionInvitation || "true" === b.uvpvSwitch ? e(u.load, b) : s()
    }
        .call(window);
